package com.superm.entity;

import com.alibaba.fastjson.JSONArray;
import com.superm.mappers.PurchaseDetailsMapper;
import com.superm.mappers.ShelfApplicationMapper;
import com.superm.mappers.ShelfComeoutMapper;
import com.superm.mappers.ShelfDetailsMapper;
import com.superm.service.PurchaseService;
import com.superm.service.ShelfApplicationService;
import com.superm.utils.NumberToCN;
import com.superm.utils.Tool;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.web.context.support.XmlWebApplicationContext;

import java.math.BigDecimal;
import java.util.List;

public class Test{

    public static void main(String[] args) {

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        PurchaseDetailsMapper purchaseDetailsMapper = applicationContext.getBean(PurchaseDetailsMapper.class);
        //根据订单查询所有详情信息
        List<PurchaseDetails> purchaseDetails = purchaseDetailsMapper.selectCodeMationOne("CG2265524819631205");
        //循环详情信息
        //对库存表的信息进行减少
        purchaseDetails.forEach(purchaseDetail->{
            System.out.println("ddd");
        });
    }
}

